import store from '../../utils/store'
import dayjs from "dayjs";
Page({
    data: {
        show: true,
        minDate: new Date(2020, 0, 1).getTime(),
        maxDate: new Date().getTime(),
    },
    onClose() {
        wx.switchTab({
            url: '/pages/order/index'
        })
    },
    onConfirm(event) {
        let [start, end] = event.detail;
        start = dayjs(start).format('YYYY-MM-DD')
        end = dayjs(end).format('YYYY-MM-DD')
        store.setItem('startTime', start)
        store.setItem('endTime', end)
        wx.switchTab({
            url: '/pages/order/index'
        })
    },
});